/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 1.0.4</a>, using an XML
 * Schema.
 * $Id$
 */

package com.jzhao.jpre.format.sequential.castor;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;

/**
 * Class FieldType.
 * 
 * @version $Revision$ $Date$
 */
public class FieldType implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _dataName
     */
    private java.lang.String _dataName;

    /**
     * Field _null
     */
    private boolean _null;

    /**
     * keeps track of state for field: _null
     */
    private boolean _has_null;

    /**
     * Field _fromCodePage
     */
    private java.lang.String _fromCodePage;

    /**
     * Field _toCodePage
     */
    private java.lang.String _toCodePage;

    /**
     * Field _isMac
     */
    private boolean _isMac;

    /**
     * keeps track of state for field: _isMac
     */
    private boolean _has_isMac;

    /**
     * Field _isRaw
     */
    private boolean _isRaw;

    /**
     * keeps track of state for field: _isRaw
     */
    private boolean _has_isRaw;

    /**
     * Field _sum
     */
    private java.lang.String _sum;

    /**
     * Field _fieldLength
     */
    private com.jzhao.jpre.format.sequential.castor.FieldLength _fieldLength;

    /**
     * Field _fieldTypeChoice
     */
    private com.jzhao.jpre.format.sequential.castor.FieldTypeChoice _fieldTypeChoice;

    /**
     * Field _transField
     */
    private com.jzhao.jpre.format.sequential.castor.TransField _transField;

    
    private boolean _isToken;
    
      //----------------/
     //- Constructors -/
    //----------------/



	public FieldType() 
     {
        super();
    } //-- com.jzhao.jpre.format.sequential.castor.FieldType()
    
    public void deleteIsToken()
    {
        this._isToken= false;
    } //-- void deleteIsToken() 

      //-----------/
     //- Methods -/
    //-----------/

    /**
     */
    public void deleteIsMac()
    {
        this._has_isMac= false;
    } //-- void deleteIsMac() 

    /**
     */
    public void deleteIsRaw()
    {
        this._has_isRaw= false;
    } //-- void deleteIsRaw() 

    /**
     */
    public void deleteNull()
    {
        this._has_null= false;
    } //-- void deleteNull() 

    /**
     * Returns the value of field 'dataName'.
     * 
     * @return the value of field 'DataName'.
     */
    public java.lang.String getDataName()
    {
        return this._dataName;
    } //-- java.lang.String getDataName() 

    /**
     * Returns the value of field 'fieldLength'.
     * 
     * @return the value of field 'FieldLength'.
     */
    public com.jzhao.jpre.format.sequential.castor.FieldLength getFieldLength()
    {
        return this._fieldLength;
    } //-- com.jzhao.jpre.format.sequential.castor.FieldLength getFieldLength() 

    /**
     * Returns the value of field 'fieldTypeChoice'.
     * 
     * @return the value of field 'FieldTypeChoice'.
     */
    public com.jzhao.jpre.format.sequential.castor.FieldTypeChoice getFieldTypeChoice()
    {
        return this._fieldTypeChoice;
    } //-- com.jzhao.jpre.format.sequential.castor.FieldTypeChoice getFieldTypeChoice() 

    /**
     * Returns the value of field 'fromCodePage'.
     * 
     * @return the value of field 'FromCodePage'.
     */
    public java.lang.String getFromCodePage()
    {
        return this._fromCodePage;
    } //-- java.lang.String getFromCodePage() 

    /**
     * Returns the value of field 'isMac'.
     * 
     * @return the value of field 'IsMac'.
     */
    public boolean getIsMac()
    {
        return this._isMac;
    } //-- boolean getIsMac() 

    /**
     * Returns the value of field 'isRaw'.
     * 
     * @return the value of field 'IsRaw'.
     */
    public boolean getIsRaw()
    {
        return this._isRaw;
    } //-- boolean getIsRaw() 

    /**
     * Returns the value of field 'null'.
     * 
     * @return the value of field 'Null'.
     */
    public boolean getNull()
    {
        return this._null;
    } //-- boolean getNull() 

    /**
     * Returns the value of field 'sum'.
     * 
     * @return the value of field 'Sum'.
     */
    public java.lang.String getSum()
    {
        return this._sum;
    } //-- java.lang.String getSum() 

    /**
     * Returns the value of field 'toCodePage'.
     * 
     * @return the value of field 'ToCodePage'.
     */
    public java.lang.String getToCodePage()
    {
        return this._toCodePage;
    } //-- java.lang.String getToCodePage() 

    /**
     * Returns the value of field 'transField'.
     * 
     * @return the value of field 'TransField'.
     */
    public com.jzhao.jpre.format.sequential.castor.TransField getTransField()
    {
        return this._transField;
    } //-- com.jzhao.jpre.format.sequential.castor.TransField getTransField() 

    /**
     * Method hasIsMac
     * 
     * 
     * 
     * @return true if at least one IsMac has been added
     */
    public boolean hasIsMac()
    {
        return this._has_isMac;
    } //-- boolean hasIsMac() 

    /**
     * Method hasIsRaw
     * 
     * 
     * 
     * @return true if at least one IsRaw has been added
     */
    public boolean hasIsRaw()
    {
        return this._has_isRaw;
    } //-- boolean hasIsRaw() 

    /**
     * Method hasNull
     * 
     * 
     * 
     * @return true if at least one Null has been added
     */
    public boolean hasNull()
    {
        return this._has_null;
    } //-- boolean hasNull() 

    /**
     * Returns the value of field 'isMac'.
     * 
     * @return the value of field 'IsMac'.
     */
    public boolean isIsMac()
    {
        return this._isMac;
    } //-- boolean isIsMac() 

    /**
     * Returns the value of field 'isRaw'.
     * 
     * @return the value of field 'IsRaw'.
     */
    public boolean isIsRaw()
    {
        return this._isRaw;
    } //-- boolean isIsRaw() 

    /**
     * Returns the value of field 'null'.
     * 
     * @return the value of field 'Null'.
     */
    public boolean isNull()
    {
        return this._null;
    } //-- boolean isNull() 

    /**
     * Method isValid
     * 
     * 
     * 
     * @return true if this object is valid according to the schema
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * 
     * 
     * @param out
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * 
     * 
     * @param handler
     * @throws java.io.IOException if an IOException occurs during
     * marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Sets the value of field 'dataName'.
     * 
     * @param dataName the value of field 'dataName'.
     */
    public void setDataName(java.lang.String dataName)
    {
        this._dataName = dataName;
    } //-- void setDataName(java.lang.String) 

    /**
     * Sets the value of field 'fieldLength'.
     * 
     * @param fieldLength the value of field 'fieldLength'.
     */
    public void setFieldLength(com.jzhao.jpre.format.sequential.castor.FieldLength fieldLength)
    {
        this._fieldLength = fieldLength;
    } //-- void setFieldLength(com.jzhao.jpre.format.sequential.castor.FieldLength) 

    /**
     * Sets the value of field 'fieldTypeChoice'.
     * 
     * @param fieldTypeChoice the value of field 'fieldTypeChoice'.
     */
    public void setFieldTypeChoice(com.jzhao.jpre.format.sequential.castor.FieldTypeChoice fieldTypeChoice)
    {
        this._fieldTypeChoice = fieldTypeChoice;
    } //-- void setFieldTypeChoice(com.jzhao.jpre.format.sequential.castor.FieldTypeChoice) 

    /**
     * Sets the value of field 'fromCodePage'.
     * 
     * @param fromCodePage the value of field 'fromCodePage'.
     */
    public void setFromCodePage(java.lang.String fromCodePage)
    {
        this._fromCodePage = fromCodePage;
    } //-- void setFromCodePage(java.lang.String) 

    /**
     * Sets the value of field 'isMac'.
     * 
     * @param isMac the value of field 'isMac'.
     */
    public void setIsMac(boolean isMac)
    {
        this._isMac = isMac;
        this._has_isMac = true;
    } //-- void setIsMac(boolean) 

    /**
     * Sets the value of field 'isRaw'.
     * 
     * @param isRaw the value of field 'isRaw'.
     */
    public void setIsRaw(boolean isRaw)
    {
        this._isRaw = isRaw;
        this._has_isRaw = true;
    } //-- void setIsRaw(boolean) 

    /**
     * Sets the value of field 'null'.
     * 
     * @param _null
     * @param null the value of field 'null'.
     */
    public void setNull(boolean _null)
    {
        this._null = _null;
        this._has_null = true;
    } //-- void setNull(boolean) 

    /**
     * Sets the value of field 'sum'.
     * 
     * @param sum the value of field 'sum'.
     */
    public void setSum(java.lang.String sum)
    {
        this._sum = sum;
    } //-- void setSum(java.lang.String) 

    /**
     * Sets the value of field 'toCodePage'.
     * 
     * @param toCodePage the value of field 'toCodePage'.
     */
    public void setToCodePage(java.lang.String toCodePage)
    {
        this._toCodePage = toCodePage;
    } //-- void setToCodePage(java.lang.String) 

    /**
     * Sets the value of field 'transField'.
     * 
     * @param transField the value of field 'transField'.
     */
    public void setTransField(com.jzhao.jpre.format.sequential.castor.TransField transField)
    {
        this._transField = transField;
    } //-- void setTransField(com.jzhao.jpre.format.sequential.castor.TransField) 

    /**
     * Method unmarshal
     * 
     * 
     * 
     * @param reader
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @return the unmarshaled
     * com.jzhao.jpre.format.sequential.castor.FieldType
     */
    public static com.jzhao.jpre.format.sequential.castor.FieldType unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (com.jzhao.jpre.format.sequential.castor.FieldType) Unmarshaller.unmarshal(com.jzhao.jpre.format.sequential.castor.FieldType.class, reader);
    } //-- com.jzhao.jpre.format.sequential.castor.FieldType unmarshal(java.io.Reader) 

    /**
     * 
     * 
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 
    
    
    public boolean isIsToken() {
		return _isToken;
	}
    public boolean getIsToken() {
		return _isToken;
	}
    public boolean hasIsToken()
    {
        return this._isToken;
    } 
	public void setIsToken(boolean isToken) {
		_isToken = isToken;
	}
}
